/*
 * The MIT License
 *
 * Copyright 2011 Edwin Bratini <edwin.bratini@gmail.com>.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */

/*
 * RegistroEdicionPruebaPsicologica.java
 *
 * Created on Nov 10, 2011, 10:18:53 AM
 */
package org.salvador_dali.psychsys.ui;

import java.awt.Color;
import java.awt.Toolkit;
import java.io.File;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import javax.swing.DefaultComboBoxModel;
import javax.swing.DefaultListModel;
import javax.swing.JFileChooser;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.filechooser.FileNameExtensionFilter;
import org.salvador_dali.psychsys.business.validators.DateFieldValidator;
import org.salvador_dali.psychsys.business.DateUtils;
import org.salvador_dali.psychsys.business.validators.EmptyFieldValidator;
import org.salvador_dali.psychsys.business.EntitySearcher;
import org.salvador_dali.psychsys.business.validators.FieldValidator;
import org.salvador_dali.psychsys.business.validators.FormFieldValidator;
import org.salvador_dali.psychsys.business.jpa_controllers.CasoJpaDao;
import org.salvador_dali.psychsys.business.jpa_controllers.EstudianteJpaDao;
import org.salvador_dali.psychsys.business.jpa_controllers.PruebaPsicologicaJpaDao;
import org.salvador_dali.psychsys.business.jpa_controllers.UbicacionPruebaJpaDao;
import org.salvador_dali.psychsys.model.entities.Caso;
import org.salvador_dali.psychsys.model.entities.Estudiante;
import org.salvador_dali.psychsys.model.entities.PruebaPsicologica;
import org.salvador_dali.psychsys.model.entities.UbicacionPrueba;

/**
 *
 * @author Edwin Bratini <edwin.bratini@gmail.com>
 */
public class RegistroEdicionPruebaPsicologica extends javax.swing.JFrame {
    
    private RegistroEdicionModo modo = RegistroEdicionModo.REGISTRO;
    private PruebaPsicologicaJpaDao jpaPPSDao = new PruebaPsicologicaJpaDao();
    private Caso casoPPS;
    private Estudiante estudiantePPS;
    private PruebaPsicologica ppsAEditar;

    /** Creates new form RegistroEdicionPruebaPsicologica */
    public RegistroEdicionPruebaPsicologica() {
        initComponents();
    }
    
    public RegistroEdicionPruebaPsicologica(RegistroEdicionModo modo) {
        this();
        this.modo = modo;
    }
    
    public RegistroEdicionPruebaPsicologica(RegistroEdicionModo modo, PruebaPsicologica ppsAEditar) {
        this(modo);
        this.ppsAEditar = ppsAEditar;
    }
    
    public Caso getCasoPPS() {
        return casoPPS;
    }
    
    public void setCasoPPS(Caso casoPPS) {
        this.casoPPS = casoPPS;
    }
    
    public Estudiante getEstudiantePPS() {
        return estudiantePPS;
    }
    
    public void setEstudiantePPS(Estudiante estudiantePPS) {
        this.estudiantePPS = estudiantePPS;
    }
    
    public PruebaPsicologica getPpsAEditar() {
        return ppsAEditar;
    }
    
    public void setPpsAEditar(PruebaPsicologica ppsAEditar) {
        this.ppsAEditar = ppsAEditar;
    }
    
    public RegistroEdicionModo getModo() {
        return modo;
    }
    
    public void setModo(RegistroEdicionModo modo) {
        this.modo = modo;
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jPanel2 = new javax.swing.JPanel();
        spnPreviewPrueba = new javax.swing.JScrollPane();
        jPanel3 = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        lstUbicacionPruebas = new javax.swing.JList();
        btnAgregar = new javax.swing.JButton();
        btnQuitar = new javax.swing.JButton();
        btnLimpiar = new javax.swing.JButton();
        chkCorreccionAutomatica = new javax.swing.JCheckBox();
        lblUbicacionPrueba = new javax.swing.JLabel();
        lblUbicacionPruebaValMarker = new javax.swing.JLabel();
        lblFechaAplicacion = new javax.swing.JLabel();
        ftfFechaAplicacionPPS = new javax.swing.JFormattedTextField();
        lblCaso = new javax.swing.JLabel();
        txtCasoEstudianteReferencia = new javax.swing.JTextField();
        btnBuscar = new javax.swing.JButton();
        lblFechaAplicacionValMarker = new javax.swing.JLabel();
        lblCasoEstudianteValMarker = new javax.swing.JLabel();
        lblNombrePrueba = new javax.swing.JLabel();
        cmbNombrePrueba = new javax.swing.JComboBox();
        lblResultados = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        txaResultados = new javax.swing.JTextArea();
        lblInterpretacionPrueba = new javax.swing.JLabel();
        jScrollPane4 = new javax.swing.JScrollPane();
        txaInterpretacionPrueba = new javax.swing.JTextArea();
        cmbCasoEstReferencia = new javax.swing.JComboBox();
        txtOtroNombrePrueba = new javax.swing.JTextField();
        lblNombrePruebaValMarker = new javax.swing.JLabel();
        statusPanel = new javax.swing.JPanel();
        javax.swing.JSeparator statusPanelSeparator = new javax.swing.JSeparator();
        statusMessageLabel = new javax.swing.JLabel();
        statusAnimationLabel = new javax.swing.JLabel();
        btnAceptar = new javax.swing.JButton();
        btnCancelar = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Registrar Prueba Psicologica");
        setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("/resources/images/psych logo.png")));
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowOpened(java.awt.event.WindowEvent evt) {
                formWindowOpened(evt);
            }
        });

        jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Preview"));
        jPanel2.setAutoscrolls(true);

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(spnPreviewPrueba, javax.swing.GroupLayout.DEFAULT_SIZE, 424, Short.MAX_VALUE)
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(spnPreviewPrueba, javax.swing.GroupLayout.DEFAULT_SIZE, 529, Short.MAX_VALUE)
        );

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Correccion de Prueba"));

        lstUbicacionPruebas.setModel(new DefaultListModel());
        lstUbicacionPruebas.setEnabled(false);
        lstUbicacionPruebas.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
            public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
                lstUbicacionPruebasValueChanged(evt);
            }
        });
        jScrollPane2.setViewportView(lstUbicacionPruebas);

        btnAgregar.setText("Agregar");
        btnAgregar.setEnabled(false);
        btnAgregar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAgregarActionPerformed(evt);
            }
        });

        btnQuitar.setText("Quitar");
        btnQuitar.setEnabled(false);
        btnQuitar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnQuitarActionPerformed(evt);
            }
        });

        btnLimpiar.setText("Limpiar");
        btnLimpiar.setEnabled(false);
        btnLimpiar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnLimpiarActionPerformed(evt);
            }
        });

        chkCorreccionAutomatica.setText("Correccion Automatica");
        chkCorreccionAutomatica.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                chkCorreccionAutomaticaStateChanged(evt);
            }
        });

        lblUbicacionPrueba.setText("Ubicacion Prueba");
        lblUbicacionPrueba.setEnabled(false);

        lblUbicacionPruebaValMarker.setForeground(new java.awt.Color(255, 51, 51));
        lblUbicacionPruebaValMarker.setLabelFor(txtCasoEstudianteReferencia);

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 342, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                        .addGap(86, 86, 86)
                        .addComponent(btnAgregar, javax.swing.GroupLayout.DEFAULT_SIZE, 94, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnQuitar)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnLimpiar, javax.swing.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(chkCorreccionAutomatica)
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                .addComponent(lblUbicacionPrueba)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 260, Short.MAX_VALUE)
                                .addComponent(lblUbicacionPruebaValMarker)))))
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addComponent(chkCorreccionAutomatica)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblUbicacionPrueba)
                    .addComponent(lblUbicacionPruebaValMarker))
                .addGap(1, 1, 1)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 107, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnLimpiar)
                    .addComponent(btnQuitar)
                    .addComponent(btnAgregar)))
        );

        lblFechaAplicacion.setText("Fecha Aplicacion");

        try {
            ftfFechaAplicacionPPS.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##-##-####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }

        lblCaso.setText("Caso/Estudiante");

        txtCasoEstudianteReferencia.setEditable(false);

        btnBuscar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/images/detalles.png"))); // NOI18N
        btnBuscar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarActionPerformed(evt);
            }
        });

        lblFechaAplicacionValMarker.setForeground(new java.awt.Color(255, 51, 51));
        lblFechaAplicacionValMarker.setLabelFor(ftfFechaAplicacionPPS);

        lblCasoEstudianteValMarker.setForeground(new java.awt.Color(255, 51, 51));
        lblCasoEstudianteValMarker.setLabelFor(txtCasoEstudianteReferencia);

        lblNombrePrueba.setText("Nombre Prueba");

        cmbNombrePrueba.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "VISC-R", "Blender", "DEH", "Familia", "Pata Negra", "KADER", "ABC", "Otro" }));
        cmbNombrePrueba.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cmbNombrePruebaItemStateChanged(evt);
            }
        });

        lblResultados.setText("Resultados");

        txaResultados.setColumns(20);
        txaResultados.setLineWrap(true);
        txaResultados.setRows(5);
        jScrollPane1.setViewportView(txaResultados);

        lblInterpretacionPrueba.setText("Interpretacion");

        txaInterpretacionPrueba.setColumns(20);
        txaInterpretacionPrueba.setLineWrap(true);
        txaInterpretacionPrueba.setRows(5);
        jScrollPane4.setViewportView(txaInterpretacionPrueba);

        cmbCasoEstReferencia.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Caso", "Estudiante" }));

        txtOtroNombrePrueba.setEditable(false);
        txtOtroNombrePrueba.setForeground(new java.awt.Color(204, 204, 204));
        txtOtroNombrePrueba.setText("Otro nombre prueba");

        lblNombrePruebaValMarker.setForeground(new java.awt.Color(255, 51, 51));
        lblNombrePruebaValMarker.setLabelFor(ftfFechaAplicacionPPS);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(lblResultados)
                                    .addComponent(lblInterpretacionPrueba)
                                    .addComponent(lblFechaAplicacion)
                                    .addComponent(lblNombrePrueba))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addComponent(ftfFechaAplicacionPPS, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(lblFechaAplicacionValMarker))
                                    .addComponent(cmbCasoEstReferencia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 274, Short.MAX_VALUE)
                                    .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 274, Short.MAX_VALUE)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                            .addGroup(jPanel1Layout.createSequentialGroup()
                                                .addComponent(cmbNombrePrueba, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(txtOtroNombrePrueba))
                                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                                                .addComponent(txtCasoEstudianteReferencia, javax.swing.GroupLayout.PREFERRED_SIZE, 235, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(btnBuscar, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                        .addGap(4, 4, 4)
                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(lblNombrePruebaValMarker)
                                            .addComponent(lblCasoEstudianteValMarker)))))
                            .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addGap(18, 18, 18)
                        .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addComponent(lblCaso)))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanel2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(lblFechaAplicacion)
                                    .addComponent(ftfFechaAplicacionPPS, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lblFechaAplicacionValMarker))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(cmbCasoEstReferencia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(txtCasoEstudianteReferencia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addGap(6, 6, 6)
                                        .addComponent(lblCaso))
                                    .addComponent(btnBuscar, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addComponent(lblCasoEstudianteValMarker))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblNombrePrueba)
                            .addComponent(cmbNombrePrueba, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtOtroNombrePrueba, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblNombrePruebaValMarker))
                        .addGap(6, 6, 6)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblResultados)
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblInterpretacionPrueba)
                            .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 16, Short.MAX_VALUE)
                        .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );

        statusMessageLabel.setForeground(new java.awt.Color(0, 153, 51));
        statusMessageLabel.setText("Prueba registrada exitosamente.");

        statusAnimationLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        statusAnimationLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/images/circle progress bar 20x20.png"))); // NOI18N

        javax.swing.GroupLayout statusPanelLayout = new javax.swing.GroupLayout(statusPanel);
        statusPanel.setLayout(statusPanelLayout);
        statusPanelLayout.setHorizontalGroup(
            statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(statusPanelSeparator, javax.swing.GroupLayout.DEFAULT_SIZE, 872, Short.MAX_VALUE)
            .addGroup(statusPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(statusMessageLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 674, Short.MAX_VALUE)
                .addComponent(statusAnimationLabel)
                .addContainerGap())
        );
        statusPanelLayout.setVerticalGroup(
            statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(statusPanelLayout.createSequentialGroup()
                .addComponent(statusPanelSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(statusMessageLabel)
                    .addComponent(statusAnimationLabel))
                .addContainerGap())
        );

        btnAceptar.setText("Aceptar");
        btnAceptar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAceptarActionPerformed(evt);
            }
        });

        btnCancelar.setText("Cancelar");
        btnCancelar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCancelarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(statusPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(706, Short.MAX_VALUE)
                .addComponent(btnAceptar)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnCancelar)
                .addContainerGap())
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnCancelar, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnAceptar, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(statusPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnCancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCancelarActionPerformed
        // TODO add your handling code here:
        this.dispose();
    }//GEN-LAST:event_btnCancelarActionPerformed
    
    private void btnAceptarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAceptarActionPerformed
        // TODO add your handling code here:
        // TODO: implementar correctamente el spinning progress bar
        ProgressCircle pc = new ProgressCircle(statusAnimationLabel);
        String trabajoCompletoMensaje = "Prueba psicologica registrada exitosamente.";
        pc.start();
        LimpiadorComponentes.limpiarValidationMarkers(this);
        if (!checkFormFields()) {
            statusMessageLabel.setText("Por favor corriga los campos marcados.");
            statusMessageLabel.setForeground(Color.red);
            new Thread(new LabelToolTipShower(statusMessageLabel, 3000)).start();
            return;
        }

        // si todo esta bien
        statusMessageLabel.setVisible(false);
        String accion = null;
        try {
            if (modo != null && modo.equals(RegistroEdicionModo.REGISTRO)) {
                // creando el objeto referimiento
                accion = "crear";
                
                PruebaPsicologica pps = new PruebaPsicologica(null, DateUtils.parseDate(ftfFechaAplicacionPPS.getText()),
                        (!cmbNombrePrueba.getSelectedItem().toString().equalsIgnoreCase("otro") ? cmbNombrePrueba.getSelectedItem().toString()
                        : txtOtroNombrePrueba.getText()), (chkCorreccionAutomatica.isSelected() ? 'S' : 'N'));
                
                pps.setEstudiante(estudiantePPS);
                pps.setCaso((cmbCasoEstReferencia.getSelectedItem().toString().equalsIgnoreCase("caso") && casoPPS != null) ? casoPPS : null);
                pps.setPpsResultados(!txaResultados.getText().isEmpty() ? txaResultados.getText() : null);
                pps.setPpsInterpretacion(!txaInterpretacionPrueba.getText().isEmpty() ? txaInterpretacionPrueba.getText() : null);
                
                jpaPPSDao.persist(pps);
                
                if (chkCorreccionAutomatica.isSelected()) {
                    List<PruebaPsicologica> pruebas = (List<PruebaPsicologica>) jpaPPSDao.getPruebasPsicologicasByFechaAplicacion(DateUtils.parseDate(ftfFechaAplicacionPPS.getText()));
                    
                    int last = pruebas.size() - 1;
                    PruebaPsicologica pruebaConfirmada = pruebas.get(last);
                    ArrayList<UbicacionPrueba> ubicacionesPrueba = new ArrayList<UbicacionPrueba>();
                    
                    UbicacionPrueba ubp = null;
                    for (int i = 0; i < lstUbicacionPruebas.getModel().getSize(); i++) {
                        ubp = new UbicacionPrueba(null, lstUbicacionPruebas.getModel().getElementAt(i).toString());
                        ubp.setPruebaPsicologica(pruebaConfirmada);
                        ubicacionesPrueba.add(ubp);
                    }
                    
                    UbicacionPruebaJpaDao jpaUbpDao = new UbicacionPruebaJpaDao();
                    for (UbicacionPrueba up : ubicacionesPrueba) {
                        jpaUbpDao.persist(up);
                    }
                }
                
            } else if (modo != null && modo.equals(RegistroEdicionModo.EDICION)) {
                if (ppsAEditar == null) {
                    throw new Exception("La prueba psicologica a editar no ha sido establecida");
                }
                accion = "editar";
                trabajoCompletoMensaje = trabajoCompletoMensaje.replace("registrada", "editada");
                
                ppsAEditar.setPpsFechaAplicacion(DateUtils.parseDate(ftfFechaAplicacionPPS.getText()));
                ppsAEditar.setPpsNombrePrueba(!cmbNombrePrueba.getSelectedItem().toString().equalsIgnoreCase("otro") ? cmbNombrePrueba.getSelectedItem().toString()
                        : txtOtroNombrePrueba.getText());
                ppsAEditar.setPpsResultados(!txaResultados.getText().isEmpty() ? txaResultados.getText() : null);
                ppsAEditar.setPpsInterpretacion(!txaInterpretacionPrueba.getText().isEmpty() ? txaInterpretacionPrueba.getText() : null);
                ppsAEditar.setPpsCorrecionAutomatica(chkCorreccionAutomatica.isSelected() ? 'S' : 'N');
                
                jpaPPSDao.update(ppsAEditar);
                
                // manejar edicion de ubicacion de las pruebas
                
                // ------
            }
        } catch (Exception e) {
            JOptionPane.showMessageDialog(this, String.format("<html><p>Error al " + accion + " registro de prueba psicologica<br /><br />%s</p></html>",
                    e.getMessage()), "Prueba Psicologica", JOptionPane.ERROR_MESSAGE);
            return;
        }
        
        statusMessageLabel.setText(trabajoCompletoMensaje);
        statusMessageLabel.setForeground(Color.GREEN);
        statusMessageLabel.setVisible(true);
        new Thread(new LabelToolTipShower(statusMessageLabel, 3500)).start();
        LimpiadorComponentes.limpiarComponentes(this);
        limpiarUbpSeccion();
        ftfFechaAplicacionPPS.requestFocusInWindow();
        pc.stop();
    }//GEN-LAST:event_btnAceptarActionPerformed
    
    private void formWindowOpened(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowOpened
        // TODO add your handling code here:
        statusMessageLabel.setVisible(false);
        statusAnimationLabel.setVisible(false);
        Date currDate = new Date();
        ftfFechaAplicacionPPS.setText(String.format("%1$td%1$tm%1$tY", currDate));
        Integer year = new Integer(String.format("%tY", currDate));
        ftfFechaAplicacionPPS.setText(year.toString() + (year + 1));
        
        if (modo != null && modo.equals(RegistroEdicionModo.EDICION)) {
            if (ppsAEditar == null) {
                JOptionPane.showMessageDialog(this, "la prueba a editar no esta establecida", "Editar Prueba Psicologica", JOptionPane.ERROR_MESSAGE);
                return;
            }
            btnBuscar.setEnabled(false);
            txtCasoEstudianteReferencia.setText(ppsAEditar.getCaso() != null ? ppsAEditar.getCaso().toString() : "NA");
            cmbNombrePrueba.setSelectedItem(ppsAEditar.getPpsNombrePrueba());
            List<String> items = new ArrayList<String>() {

                {
                    for (int i = 0; i < cmbNombrePrueba.getModel().getSize(); i++) {
                        add(cmbNombrePrueba.getItemAt(i).toString());
                    }
                }
            };

            if (items.contains(ppsAEditar.getPpsNombrePrueba())) {
                cmbNombrePrueba.setSelectedItem(ppsAEditar.getPpsNombrePrueba());
            } else {
                cmbNombrePrueba.setSelectedItem("Otro");
                txtOtroNombrePrueba.setText(ppsAEditar.getPpsNombrePrueba());
                txtOtroNombrePrueba.setEnabled(true);
            }
            txaResultados.setText(ppsAEditar.getPpsResultados() != null ? ppsAEditar.getPpsResultados() : "");
            txaInterpretacionPrueba.setText(ppsAEditar.getPpsInterpretacion() != null ? ppsAEditar.getPpsInterpretacion() : "");
            chkCorreccionAutomatica.setSelected(ppsAEditar.getPpsCorrecionAutomatica() == 'S' ? true : false);

            if (ppsAEditar.getPpsCorrecionAutomatica() == 'S') {
                // get ubicaciones pruebas
                List<UbicacionPrueba> ubicacionesPrueba = new UbicacionPruebaJpaDao().getUbicacionesPruebasByPruebaPsicologica(ppsAEditar);
                DefaultListModel dlm = (DefaultListModel) lstUbicacionPruebas.getModel();
                for (UbicacionPrueba up : ubicacionesPrueba) {
                    dlm.addElement(up.getUbpUrl());
                }
            }

        }
    }//GEN-LAST:event_formWindowOpened
    
    private void btnBuscarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarActionPerformed
        // TODO add your handling code here:
        BusquedaRapida br = new BusquedaRapida(this, true);
        String title = (cmbCasoEstReferencia.getSelectedItem().toString().equalsIgnoreCase("caso") ? "Buscar Caso" : "Buscar Estudiante");
        String strEntidades = (cmbCasoEstReferencia.getSelectedItem().toString().equalsIgnoreCase("caso") ? "Casos" : "Estudiantes");
        EntitySearcher entitySearcher = (cmbCasoEstReferencia.getSelectedItem().toString().equalsIgnoreCase("caso")
                ? new EntitySearcher.CasoBasicEntitySearcher() : new EntitySearcher.EstudianteBasicEntitySearcher());
        
        br.setTitle(title);
        br.setEntitySearcher(entitySearcher);
        br.getLblEntidades().setText(strEntidades);
        br.setLocationRelativeTo(this);
        br.setVisible(true);
        
        Object objId = br.getEntitySelectedId();
        if (objId != null) {
            if (cmbCasoEstReferencia.getSelectedItem().toString().equalsIgnoreCase("caso")) {
                casoPPS = new CasoJpaDao().findById(objId);
                txtCasoEstudianteReferencia.setText(casoPPS.toString());
                estudiantePPS = casoPPS.getReferimiento().getEstudiante();
            } else {
                estudiantePPS = new EstudianteJpaDao().findById(objId);
                txtCasoEstudianteReferencia.setText(estudiantePPS.toString());
            }
        }
    }//GEN-LAST:event_btnBuscarActionPerformed
    
    private void chkCorreccionAutomaticaStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_chkCorreccionAutomaticaStateChanged
        // TODO add your handling code here:
        if (!chkCorreccionAutomatica.isSelected()) {
            lblUbicacionPrueba.setEnabled(false);
            lstUbicacionPruebas.setEnabled(false);
            btnAgregar.setEnabled(false);
            
            btnQuitar.setEnabled(false);
            btnLimpiar.setEnabled(false);
        } else if (chkCorreccionAutomatica.isSelected()) {
            lblUbicacionPrueba.setEnabled(true);
            lstUbicacionPruebas.setEnabled(true);
            btnAgregar.setEnabled(true);
            
            if (lstUbicacionPruebas.getModel().getSize() != 0) {
                btnQuitar.setEnabled(true);
                btnLimpiar.setEnabled(true);
            }
        }
    }//GEN-LAST:event_chkCorreccionAutomaticaStateChanged
    
    private void btnLimpiarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLimpiarActionPerformed
        // TODO add your handling code here:
        ((DefaultListModel) lstUbicacionPruebas.getModel()).removeAllElements();
        btnQuitar.setEnabled(false);
        btnLimpiar.setEnabled(false);
    }//GEN-LAST:event_btnLimpiarActionPerformed
    
    private void btnQuitarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnQuitarActionPerformed
        // TODO add your handling code here:
        DefaultListModel dlm = (DefaultListModel) lstUbicacionPruebas.getModel();
        int count = lstUbicacionPruebas.getSelectedIndices().length;
        for (int i = 0; i < count; i++) {
            dlm.removeElementAt(lstUbicacionPruebas.getSelectedIndex());
        }
        
        if (lstUbicacionPruebas.getModel().getSize() == 0) {
            btnQuitar.setEnabled(false);
            btnLimpiar.setEnabled(false);
        }
    }//GEN-LAST:event_btnQuitarActionPerformed
    
    private void cmbNombrePruebaItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cmbNombrePruebaItemStateChanged
        // TODO add your handling code here:
        if (cmbNombrePrueba.getSelectedItem().toString().equalsIgnoreCase("Otro")) {
            txtOtroNombrePrueba.setEditable(true);
            txtOtroNombrePrueba.setForeground(Color.BLACK);
        } else {
            txtOtroNombrePrueba.setEditable(false);
            txtOtroNombrePrueba.setForeground(Color.GRAY);
        }
    }//GEN-LAST:event_cmbNombrePruebaItemStateChanged
    
    private void btnAgregarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAgregarActionPerformed
        // TODO add your handling code here:
        JFileChooser chooser = new JFileChooser();
        DefaultListModel dlm = (DefaultListModel) lstUbicacionPruebas.getModel();
        
        chooser.setFileFilter(new FileNameExtensionFilter("Imagenes [*.png, *.gif, *.jpg, *.jpeg]", "png", "gif", "jpg", "jpeg"));
        chooser.setMultiSelectionEnabled(true);
        if (chooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
            String imagePath = "";
            File[] imagesFiles = chooser.getSelectedFiles();
            for (File file : imagesFiles) {
                imagePath = file.getAbsolutePath();
                if (!dlm.contains(imagePath)) {
                    dlm.addElement(imagePath);
                }
            }
            
            if (!btnQuitar.isEnabled()) {
                btnQuitar.setEnabled(true);
            }
            
            if (!btnLimpiar.isEnabled()) {
                btnLimpiar.setEnabled(true);
            }
        }
    }//GEN-LAST:event_btnAgregarActionPerformed
    
    private void lstUbicacionPruebasValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_lstUbicacionPruebasValueChanged
        // TODO add your handling code here:
        if (lstUbicacionPruebas.getSelectedIndices().length == 1) {
            //ImageUtil.loadAndDisplayImage(lstUbicacionPruebas.getSelectedValue().toString(), pnlPreviewPrueba);
            spnPreviewPrueba.add(new JImagePanel(ImageUtil.loadImage(lstUbicacionPruebas.getSelectedValue().toString()), 0, 0));
            spnPreviewPrueba.repaint();
        }
    }//GEN-LAST:event_lstUbicacionPruebasValueChanged
    
    private void limpiarUbpSeccion() {
        btnLimpiar.doClick();
        lblUbicacionPrueba.setEnabled(false);
        lstUbicacionPruebas.setEnabled(false);
        btnAgregar.setEnabled(false);
        btnQuitar.setEnabled(false);
        btnLimpiar.setEnabled(false);
    }
    
    private boolean checkFormFields() {
        boolean validFields = true;
        LimpiadorComponentes.limpiarValidationMarkers(this);
        
        FieldValidator emptynessVal, dateVal;
        emptynessVal = new EmptyFieldValidator();
        dateVal = new DateFieldValidator();
        
        FieldValidator[] emptynessArr = new FieldValidator[]{emptynessVal};
        
        HashMap<JLabel, FieldValidator[]> campos = new HashMap<JLabel, FieldValidator[]>();
        campos.put(lblFechaAplicacionValMarker, new FieldValidator[]{emptynessVal, dateVal});
        campos.put(lblCasoEstudianteValMarker, emptynessArr);
        
        validFields &= FormFieldValidator.verifyFormFields(campos);
        
        if (cmbNombrePrueba.getSelectedItem().toString().equalsIgnoreCase("otro")
                && (txtCasoEstudianteReferencia.getText().isEmpty() || txtCasoEstudianteReferencia.getText().equalsIgnoreCase("otro nombre prueba"))) {
            lblNombrePruebaValMarker.setText("*");
            lblNombrePruebaValMarker.setToolTipText("Porfavor digite nombre prueba valido");
            lblNombrePruebaValMarker.setVisible(true);
            validFields &= false;
        }
        
        if (chkCorreccionAutomatica.isSelected() && lstUbicacionPruebas.getModel().getSize() < 1) {
            lblUbicacionPruebaValMarker.setText("*");
            lblUbicacionPruebaValMarker.setToolTipText("Porfavor indique ubicacion(es) de la prueba");
            lblUbicacionPruebaValMarker.setVisible(true);
            validFields &= false;
        }
        
        return validFields;
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Windows".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(RegistroEdicionPruebaPsicologica.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(RegistroEdicionPruebaPsicologica.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(RegistroEdicionPruebaPsicologica.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(RegistroEdicionPruebaPsicologica.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            
            public void run() {
                new RegistroEdicionPruebaPsicologica().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAceptar;
    private javax.swing.JButton btnAgregar;
    private javax.swing.JButton btnBuscar;
    private javax.swing.JButton btnCancelar;
    private javax.swing.JButton btnLimpiar;
    private javax.swing.JButton btnQuitar;
    private javax.swing.JCheckBox chkCorreccionAutomatica;
    private javax.swing.JComboBox cmbCasoEstReferencia;
    private javax.swing.JComboBox cmbNombrePrueba;
    private javax.swing.JFormattedTextField ftfFechaAplicacionPPS;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JLabel lblCaso;
    private javax.swing.JLabel lblCasoEstudianteValMarker;
    private javax.swing.JLabel lblFechaAplicacion;
    private javax.swing.JLabel lblFechaAplicacionValMarker;
    private javax.swing.JLabel lblInterpretacionPrueba;
    private javax.swing.JLabel lblNombrePrueba;
    private javax.swing.JLabel lblNombrePruebaValMarker;
    private javax.swing.JLabel lblResultados;
    private javax.swing.JLabel lblUbicacionPrueba;
    private javax.swing.JLabel lblUbicacionPruebaValMarker;
    private javax.swing.JList lstUbicacionPruebas;
    private javax.swing.JScrollPane spnPreviewPrueba;
    private javax.swing.JLabel statusAnimationLabel;
    private javax.swing.JLabel statusMessageLabel;
    private javax.swing.JPanel statusPanel;
    private javax.swing.JTextArea txaInterpretacionPrueba;
    private javax.swing.JTextArea txaResultados;
    private javax.swing.JTextField txtCasoEstudianteReferencia;
    private javax.swing.JTextField txtOtroNombrePrueba;
    // End of variables declaration//GEN-END:variables
}
